# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="Update the file systems table file /etc/fstab and create/remove mount points in /media"
HOMEPAGE="http://"
SRC_URI="${P}.tar.bz2"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND=">=sys-apps/hal-0.5.7.1
        || (sys-apps/dbus-core >=sys-apps/dbus-0.50)
	dev-libs/dbus-glib"

RDEPEND="${DEPEND}"

# Source directory; the dir where the sources can be found (automatically
# unpacked) inside ${WORKDIR}.  The default value for S is ${WORKDIR}/${P}
# If you don't need to change it, leave the S= line out of the ebuild
# to keep it tidy.
#S="${WORKDIR}/${P}"

src_compile() {
    econf || die "econf failed"
    emake || die "emake failed"
}

src_install() {
    emake DESTDIR="${D}" install || die "emake install failed"

    insinto /usr/share/hal/scripts ; doins ${FILESDIR}/fstab-sync
    fperms 0755 /usr/share/hal/scripts/fstab-sync
    
    dodoc README COPYING AUTHORS ChangeLog NEWS TODO fdi/10-fstab-sync-mount-options-cp1251.fdi
}
